package io;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Scanner;

public class Demo8 {
    public static void main(String[] args) {
        //inputStream搭配scanner使用
        try(InputStream inputStream=new FileInputStream("C:/test/text.txt")){
            Scanner scanner = new Scanner(inputStream);
            int a = scanner.nextInt();
            int b = scanner.nextInt();
            int c = scanner.nextInt();
            int d = scanner.nextInt();
            System.out.println(a + ", " + b + ", " + c + ", " + d);

        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
